import requests from '../config/request.js'

export const searchOnlineServePlayerInfoList = (payload) => {
	return requests.httpTokenRequest({
		url: "OnlineServer/SearchOnlineServePlayerInfoList",
		data: payload
	});
};

//线上教练详情页面，最新评论
// export const getOnlineServePlayerDetailComment = (payload) => {
// 	return requests.httpTokenRequest({
// 		url: "OnlineServer/GetAppOnlineServePlayerDetailComment",
// 		data: payload
// 	});
// };

//线上评论列表
export const getAppOnlineServePlayerCommentList = (payload) => {
	return requests.httpTokenRequest({
		url: "OnlineServer/GetAppOnlineServePlayerCommentList",
		data: payload
	});
};


//线上教练详情页面，评论总数量
export const getAppOnlineServePlayerCommentQty = (payload) => {
	return requests.httpTokenRequest({
		url: "OnlineServer/GetAppOnlineServePlayerCommentQty",
		data: payload
	});
};

//根据教练Id获取游戏tag
export const getServeTagByServerId = (payload) => {
	return requests.httpTokenRequest({
		url: "OnlineServer/GetServeTagByServerId",
		data: payload
	});
};

//提交线上教练订单
export const submitOnlineOrder = (payload) => {
	return requests.httpTokenRequestSpecial({
		url: "OnlineServer/SubmitOnlineOrder",
		data: payload
	});
};

//获取我的陪玩线上订单列表
export const searchWechatMyOnlinePlayOrderInfoList = (payload) => {
	return requests.httpTokenRequest({
		url: "OnlineServer/SearchWechatMyOnlinePlayOrderInfoList",
		data: payload
	});
};

//线上订单申请退款
export const onlinePlayerOrderRefund = (payload) => {
	return requests.httpTokenRequest({
		url: "OnlineServer/OnlinePlayerOrderRefund",
		data: payload
	});
};


//获取订单详情
export const getOnlinePlayerOrderDetailInfo = (payload) => {
	return requests.httpTokenRequest({
		url: "OnlineServer/GetOnlinePlayerOrderDetailInfo",
		data: payload
	});
};

//评价线上达人订单
export const onlinePlayerOrderComment = (payload) => {
	return requests.httpTokenRequest({
		url: "OnlineServer/OnlinePlayerOrderComment",
		data: payload
	});
};


//更新订单状态
export const updateOnlinePlayerOrderStatus = (payload) => {
	return requests.httpTokenRequest({
		url: "OnlineServer/UpdateOnlinePlayerOrderStatus",
		data: payload
	});
};


//获取我的线上约玩退款
export const searchWechatOnlinePlayOrderRefundList = (payload) => {
	return requests.httpTokenRequest({
		url: "OnlineServer/SearchWechatOnlinePlayOrderRefundList",
		data: payload
	});
};



//获取线上达人详情
export const getOnlineServePlayerDetailInfo = (payload) => {
	return requests.httpTokenRequest({
		url: "OnlineServer/GetOnlineServePlayerDetailInfo",
		data: payload
	});
};

// *****************************************************************************
//线上教练详情页面，最新评论
export const getOnlineServePlayerDetailComment = (payload) => {
	return requests.requestAll("/client/serverPlayer/allComment",'get',payload);

};